#include	<sys/types.h>
#include	<sys/stat.h>
#include	<fcntl.h>
#include	"my.h"

int		xopen(char *pathname, int flag)
{
  int		fd;

  fd = open(pathname, flag,
	    S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
  if (fd == -1)
    {
      my_put_error("Error : open function failed\n");
      return (-1);
    }
  return (fd);
}
